package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.DailyReview;
import cn.wolfcode.trip.base.query.DailyQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DailyReviewMapper {
    /**
     * 删除日报内容
     * @param id
     * @return
     */
    int deleteByPrimaryKey(Long id);

    /**
     * 日报内容新增
     * @param record
     * @return
     */
    int insert(DailyReview record);

    /**
     * 查询单条日报
     * @param id
     * @return
     */
    DailyReview selectByPrimaryKey(Long id);

    /**
     * 查询所有日报
     * @return
     */
    List<DailyReview> selectAll();

    /**
     * 更新日报
     * @param record
     * @return
     */
    int updateByPrimaryKey(DailyReview record);

    List<DailyReview> getDailyReviewsById(DailyQueryObject qo);

    void insertRelation(@Param("dailyId") Long dailyId, @Param("dailyReviewId") Long dailyReviewId);
}